<template>
    <view-box style="background:#f4f4f4">
        <div></div>
        <div class="border-back-preview" v-if="addBasic.basic !== null">
            <div class="border-prou">
                <h4>基本信息</h4>
            </div>
            <p class="padding-lefts">
                <span>真实姓名</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span  v-if="addBasic.basic">{{addBasic.basic.true_name}}</span>
            </p>
             <p class="padding-lefts">
                <span>性　别</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.sex === 1">男</span>
                 <span v-if="addBasic.sex === 2">女</span>
            </p>
             <p class="padding-lefts">
                <span>出生日期</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.birth}}</span>
            </p>
            <p class="padding-lefts">
                <span>当前城市</span>
                <span v-if="addBasic.basic">{{addBasic.basic.city}}-{{addBasic.basic.area}}</span>
            </p>
            <p class="padding-lefts">
                <span>开始工作</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.start_work_time}}</span>
            </p>
            <p class="padding-lefts">
                <span>手机号</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.mobile}}</span>
            </p>
            <p class="padding-lefts">
                <span>电子邮箱</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.mailbox}}</span>
            </p>
            <p class="padding-lefts">
                <span>当前公司</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.company}}</span>
            </p>
            <p class="padding-lefts">
                <span>当前职位</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.position}}</span>
            </p>
            <!-- <p class="padding-lefts">
                <span>当前行业</span>
                <span>{{addBasic.basic.true_name}}</span>
            </p>
            <p class="padding-lefts">
                <span>当前职能</span>
                <span>{{addBasic.basic.true_name}}</span>
            </p> -->
            <p class="padding-lefts">
                <span>当前状态</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic">{{addBasic.basic.now_status}}</span>
            </p>
        </div>
        <div style="height:6px"></div>
        <div class="border-back-preview">
            <div class="border-prou">
                <h4>工作经历</h4>
            </div>
          <div class="border-bottom-pre" v-for="(item, index) in addBasic.work" :key="index">
            <p class="padding-lefts">
                <span>{{item.job_title}}</span>
                <span>{{item.company}}</span>
            </p>
             <p class="padding-lefts">
                <span>{{item.start_time}}</span>-
                <span>{{item.over_time}}</span>
            </p>
             <p class="padding-lefts">
                <span>公司行业</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.industry}}</span>
            </p>
             <p class="padding-lefts">
                <span>职能业绩</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.performance}}</span>
            </p>
             <p class="padding-lefts">
                <span>汇报对象</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.report}}</span>
            </p>
             <p class="padding-lefts">
                <span>下属人数</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.subordinate_number}}</span>
            </p>
             <p class="padding-lefts">
                <span>年　薪</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.nianxin}}</span>
            </p>
             <p class="padding-lefts">
                <span>公司性质</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.nature}}</span>
            </p>
             <p class="padding-lefts">
                <span>公司规模</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.scale}}</span>
            </p>
             <p class="padding-lefts">
                <span>所在部门</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.department}}</span>
            </p>
             <p class="padding-lefts">
                <span>公司介绍</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.company_introduction}}</span>
            </p>
          </div>
        </div>
        <div style="height:6px"></div>
        <div class="border-back-preview">
            <div class="border-prou">
                <h4>教育经历</h4>
            </div>
          <div class="border-bottom-pre" v-for="(item, index) in addBasic.education" :key="index">
            <p class="padding-lefts">
                <span>{{item.start_time}}</span>-
                <span>{{item.over_time}}</span>
                <span>{{item.school_name}}</span>
            </p>
             <p class="padding-lefts">
                <span>专　业</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.education}}</span>
            </p>
             <p class="padding-lefts">
                <span>学　历</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.major}}</span>
            </p>
             <p class="padding-lefts">
                <span>统　招</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="item.is_unified === 0">否</span>
                <span v-if="item.is_unified === 1">是</span>
            </p>
          </div>
        </div>
        <div style="height:6px"></div>
        <div class="border-back-preview">
            <div class="border-prou">
                <h4>职业意向</h4>
            </div>
          <div class="border-bottom-pre" v-if="addBasic.intention !== null">
             <p class="padding-lefts">
                <span>期望行业</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.intention">{{addBasic.intention.desired_industry}}</span>
            </p>
             <p class="padding-lefts">
                <span>期望职能</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.intention">{{addBasic.intention.desired_career}}</span>
            </p>
            <p class="padding-lefts">
                <span>期望地点</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.intention">{{addBasic.intention.city}}-{{addBasic.intention.area}}</span>
            </p>
            <p class="padding-lefts">
                <span>期望年薪</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.intention">{{addBasic.intention.desired_annual_salary}}</span>
            </p>
            <p class="padding-lefts" v-if="addBasic.basic">
                <span>目前年薪</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.basic.is_look_annual_salary === 1">{{addBasic.basic.annual_salary}}</span>
                <span v-if="addBasic.basic.is_look_annual_salary === 0">保密</span>
            </p>
          </div>
        </div>
         <div style="height:6px"></div>
        <div class="border-back-preview">
            <div class="border-prou">
                <h4>语言能力</h4>
            </div>
          <div class="border-bottom-pre" v-if="addBasic.languag !==null">
             <p class="padding-lefts">
                <span>语言能力</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span v-if="addBasic.language">{{addBasic.language.language}}</span>
            </p>
          </div>
        </div>
         <div style="height:6px"></div>
        <div class="border-back-preview">
            <div class="border-prou">
                <h4>项目经验</h4>
            </div>
          <div class="border-bottom-pre" v-for="(item, index) in addBasic.project" :key="index">
            <p class="padding-lefts">
                <span>{{item.project_name}}</span>
                <span>{{item.start_time}}</span>-
                <span>{{item.over_time}}</span>
            </p>
             <p class="padding-lefts">
                <span>项目职务</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.duty}}</span>
            </p>
             <p class="padding-lefts">
                <span>所在公司</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.corporation}}</span>
            </p>
             <p class="padding-lefts">
                <span>项目描述</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.project_description}}</span>
            </p>
             <p class="padding-lefts">
                <span>项目职责</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.project_role}}</span>
            </p>
             <p class="padding-lefts">
                <span>项目业绩</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{item.project_performance}}</span>
            </p>
          </div>
        </div>
        <div class="postforum" v-if="uid === 0">
            <button class="button-o1" @click="updata(2)">同意</button>
            <button class="button-o2" @click="updata(3)">拒绝</button>
        </div>
    </view-box>
</template>
<script>
import { ViewBox, Box, XInput, Group, XButton, Datetime, PopupPicker, CheckIcon } from 'vux'
export default {
  name: 'Addresume',
  components: {
    ViewBox,
    Box,
    XInput,
    Group,
    XButton,
    Datetime,
    PopupPicker,
    CheckIcon
  },
  data () {
    return {
      radio001: ['是否统招'],
      value4: '',
      value3: '',
      value6: [['博士后', '博士', 'MBA/EMBA', '硕士', '本科', '大专', '中专', '中技', '高中', '初中']],
      is_unified: false,
      pid: '',
      tabldata: {
        id: '',
        school_name: '',
        major: '',
        education: '',
        is_unified: '',
        start_time: '',
        over_time: ''
      },
      uid: 0,
      addBasic: {},
      addiss: {},
      data: [],
      addResume: {}
    }
  },
  computed: {
    disabled () {
      console.log('zunhh')
    },
    userInfo () {
      return this.$store.getters.userInfo
    }
  },
  mounted () {
    this._getresume()
    if (!this.$store.state.auth.userInfo) {
      this.$store.dispatch('getUserInfo')
    }
    this.uid = this.$route.query.uin ? this.$route.query.uin : 0
  },
  methods: {
    change () {
      console.log('zhou')
    },
    _getresume () {
      this.$http.get('/lookOthersInfo/' + this.$route.query.userid).then(response => {
        this.addBasic = response.data
        // console.log(this.addressValue)
      }).catch(error => {
        console.log(error)
      })
    },
    updata (status) {
      this.$http.put('/isConsent', {
        status: status
      }).then(response => {
        this.$vux.toast.show({
          text: response.data.message,
          type: 'text'
        })
        this.$router.push({path: '/applyfortherecord'})
      }).catch(error => {
        console.log(error)
      })
    }
  }
}
</script>

<style scoped>
.button-o1{
    background: #fff;
    height: 40px;
    width: 50%;
    border-radius: 0px;
    color: #6D7BFE;
    border:1px solid #6D7BFE;

}
.button-o2{
    background: #6D7BFE;
    height: 40px;
    width: 50%;
    border-radius: 0px;
    color:#fff;
    border:1px solid #6D7BFE;
    
}
.postforum{
    width:100%;
    position: fixed;
    bottom: 0px;
    left:0px;
    display: flex;
}
    .btn-set-default {
        flex: 1;
        line-height: 50px;
    }
    .border-back-preview{
        background: #fff;
        width: 100%;
    }
    .border-prou{
        width: 100%;
        height: 50px;
        border-bottom: 1px solid #f4f4f4;
        padding: 1px 10px;
        line-height: 50px;
    }
    .padding-lefts {
        padding: 1px 10px;
    }
    .border-bottom-pre{
        width: 100%;
        height: auto;
        border-bottom: 1px solid #f4f4f4;
        padding: 1px 10px;
    }
</style>
<style>
 .weui-cells:before{
        border-top: 0px solid #D9D9D9 !important;
    }
    .weui-cells:after{
        border-bottom: 0px solid #D9D9D9 !important;
    }
</style>